Method and apparatus for adjusting an ambient light threshold

ABSTRACT

A load control device adapted to be coupled between an AC power source and an electrical load for controlling the power delivered to the load includes a controller, an actuator for turning the electrical load on and off, an occupancy detection circuit, and an ambient light detector. The load control device automatically turns on the electrical load in response to the presence of an occupant only if the detected ambient light is below a predetermined ambient light level threshold. After first detecting the presence of an occupant, the load control device monitors actuations of the actuator to determine whether a user has changed the state of the load. The load control device automatically adjusts the predetermined ambient light level threshold in response to the user actuations that change the state of the load.

CROSS REFERENCES TO RELATED APPLICATIONS

This application is a non-provisional application of commonly-assignedU.S. Provisional Application No. 61/495,457, filed Jun. 10, 2011,entitled METHOD AND APPARATUS FOR ADJUSTING AN AMBIENT LIGHT THRESHOLD,the entire disclosure of which is hereby incorporated by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to load control devices for control of thepower delivered from an alternating-current (AC) power source to anelectrical load, and more particularly, to an ambient light thresholdadjustment procedure for a load control device that is operable tocontrol the electrical load in response to detected occupancy andambient light conditions.

2. Description of the Related Art

Typical load control devices are operable to control the amount of powerdelivered to an electrical load, such as a lighting load or a motorload, from an alternating-current (AC) power source. Wall-mounted loadcontrol devices are adapted to be mounted to standard electricalwallboxes. A dimmer switch comprises a controllably conductive device(e.g., a bidirectional semiconductor switch, such as, a triac), which iscoupled in series between the power source and the load. Thecontrollably conductive device is controlled to be conductive andnon-conductive for portions of a half-cycle of the AC power source tothus control the amount of power delivered to the load (e.g., using aphase-control dimming technique). A “smart” dimmer switch (i.e., adigital dimmer switch) comprises a microprocessor (or similarcontroller) for controlling the semiconductor switch and a power supplyfor powering the microprocessor.

An electronic switch (i.e., a digital switch) comprises a controllablyconductive device (such as a relay or a bidirectional semiconductorswitch), a microprocessor, and a power supply. In contrast to a smartdimmer switch, the controllably conductive device of an electronicswitch is not controlled using the phase-controlled dimming technique,but is controlled to be either conductive or non-conductive during eachhalf-cycle of the AC power source to thus toggle the electrical load onand off. Digital dimmers and switches may further comprise occupancydetection circuits such that the dimmers and switches are able tooperate as occupancy sensors to automatically turn on lighting loads inresponse to the presence of an occupant (i.e., an occupancy condition)and automatically turn off the lighting loads in response to detectingthe absence of an occupant (i.e., a vacancy condition).

Such a digital device may further comprise an ambient light detectorsuch that the device will only turn on the lighting load in response toan occupancy condition when the detected (or measured) ambient light isbelow a predetermined ambient light level threshold. This providesenergy savings as the lighting load is not turned on unnecessarily(i.e., the lighting load is not turned on in an already brightlyilluminated space each time an occupant is detected). However, the valueof the predetermined ambient light level threshold may not be suitablein some applications and may require adjustment once the device isinstalled. Some prior art digital devices do not provide for thepredetermined ambient light level threshold to be adjusted once thedevice is installed. Other prior art digital devices may comprise adedicated mechanism such as a knob or button for adjusting the value ofthe ambient light level threshold. However, such a dedicated mechanismadds additional cost to the device. Further, such a mechanism may not bevisible to a user once the device is installed in a standard wallbox,thus the user may not realize that such a mechanism exists or that theambient light level threshold can even be adjusted.

Therefore, there exists a need for an improved method of adjusting theambient light level threshold of a digital load control device.

SUMMARY OF THE INVENTION

According to an embodiment of the present invention, a method forcontrolling the power delivered from an AC power source to an electricalload is provided. The method includes detecting an occupancy conditionand comparing a measured ambient light level to an initial ambient lightlevel threshold. The method further includes receiving an actuation tochange the state of the electrical load within a predetermined timeperiod after detecting the occupancy condition, and accordinglygenerating an adjusted ambient light level threshold in response to thestep of receiving an actuation.

According to a second embodiment of the present invention, a loadcontrol device is adapted to be coupled between an AC power source andan electrical load such that the load control device can control thepower delivered to the load. The load control device includes acontrollably conductive device adapted to be coupled between the sourceand the load for controlling the power delivered to the load, and acontroller operatively coupled to the controllably conductive device torender the controllably conductive device conductive and non-conductive.The load control device includes an actuator operatively coupled to thecontroller such that the controller is operable to render thecontrollably conductive device conductive and non-conductive in responseto actuations of the actuator. The load control device further includesan occupancy detection circuit for detecting the presence or absence ofan occupant, and an ambient light detector for measuring the ambientlight level, both of which being operatively coupled to the controller.The controller is operable to render the controllably conductive deviceconductive and non-conductive in response to the occupancy detectioncircuit and the ambient light detector. The controller is furtheroperable to automatically adjust an ambient light level threshold inresponse to detecting an actuation of the actuator that occurs within apredetermined time period of detecting the presence of an occupant.

According to a third embodiment of the present invention, a load controlsystem controls the power delivered to a load, and includes at least oneactuator operable to receive actuations to turn the load on or off inresponse to the actuations. The load control system includes anoccupancy detector for detecting the presence or absence of an occupantand an ambient light detector for measuring the ambient light level. Theload control system includes a controller that is operable to respond toactuations of the actuator, the detected presence or absence of theoccupant, and the measured ambient light level. The load control systemalso includes a load control device adapted to be coupled between an ACpower source and the load for controlling the power delivered to theload in response to the controller. The controller is operable toautomatically adjust an ambient light level threshold in response todetecting an actuation of the actuator that occurs after detecting thepresence of an occupant.

Other features and advantages of the present invention will becomeapparent from the following description of the invention that refers tothe accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention will now be described in greater detail in the followingdetailed description with reference to the drawings in which:

FIG. 1 is a simplified diagram of a lighting control system including anelectronic switch;

FIG. 2 is a simplified block diagram of the electronic switch of FIG. 1;

FIG. 3 is a simplified flowchart of an occupancy detection procedure;

FIG. 4A is a simplified flowchart of an ambient light level thresholdincrease adjustment procedure; and

FIG. 4B is a simplified flowchart of an ambient light level thresholddecrease adjustment procedure.

DETAILED DESCRIPTION OF THE INVENTION

The foregoing summary, as well as the following detailed description ofthe preferred embodiments, is better understood when read in conjunctionwith the appended drawings. For the purposes of illustrating theinvention, there is shown in the drawings an embodiment that ispresently preferred, in which like numerals represent similar partsthroughout the several views of the drawings, it being understood,however, that the invention is not limited to the specific methods andinstrumentalities disclosed.

FIG. 1 is a simplified block diagram of a lighting control system 100including an electronic switch 110 according to a first embodiment ofthe present invention. The electronic switch 110 comprises a hotterminal H and a switched hot terminal SH and is adapted to be coupledin series electrical connection between an alternating current (AC)power source 102 (e.g., 120 V_(AC) @ 60 Hz or 240 V_(AC) @ 50 Hz) and alighting load 104 for controlling the power delivered to the lightingload. The electronic switch 110 generates a switched hot voltage V_(SH)at the switched hot terminal SH, which is coupled to the lighting load104 for turning the load on and off. The electronic switch 110 furthercomprises a ground terminal G that is adapted to be coupled to earthground.

As shown in FIG. 1, the electronic switch 110 is adapted to bewall-mounted in a standard electrical wallbox. The electronic switch 110comprises a faceplate 112 and a bezel 114 received in an opening of thefaceplate. The electronic switch 110 further comprises a controlactuator 116 (i.e., a control button) that may be actuated by a user fortoggling (i.e., turning off and on) the lighting load 104, and a loadvisual indicator 118 for providing feedback of whether the lighting loadis on or off. Alternatively, the electronic switch 110 could beimplemented as a controllable screw-in module adapted to be screwed intoan electrical socket (e.g., an Edison socket) of a lamp, or as a plug-inload control device adapted to be plugged into a standard electricalreceptacle for receipt of power and further adapted to have a plug-inelectrical load electrically connected thereto.

The electronic switch 110 also operates as an occupancy sensor to turnon the lighting load 104 in response to the presence of an occupant inthe vicinity of the electronic switch (i.e., an occupancy condition),and to turn off the lighting load in response to the absence of theoccupant (i.e., a vacancy condition). The electronic switch 110comprises a lens 120 for directing the infrared energy from the occupantto an occupancy detection circuit 230 (FIG. 2), such that the electronicswitch is operable to detect the occupancy and vacancy conditions. Theelectronic switch 110 further comprises an occupancy visual indicator122 that is illuminated when the electronic switch has detected anoccupancy condition in the space. Alternatively, the occupancy visualindicator 122 could be located behind the lens 120 such that the lens isoperable to illuminate when the electronic switch 110 has detected anoccupancy condition.

Alternatively, the electronic switch 110 could operate as a vacancysensor. When operating as a vacancy sensor, the electronic switch 110would only operate to turn off the lighting load 104 in response todetecting a vacancy condition in the space. The electronic switch 110would not turn on the lighting load 104 in response to detecting anoccupancy condition. Therefore, when the electronic switch operates as avacancy sensor, the lighting load 104 must be turned on manually (e.g.,in response to a manual actuation of the control actuator 116). Examplesof occupancy and vacancy sensors are described in greater detail in U.S.patent application Ser. No. 12/203,500, filed Sep. 3, 2008, entitledBATTERY-POWERED OCCUPANCY SENSOR, the entire disclosure of which ishereby incorporated by reference.

FIG. 2 is a simplified block diagram of the electronic switch 110. Theelectronic switch 110 comprises a controllably conductive device (e.g.,a latching relay 210) connected in series electrical connection betweenthe hot terminal H and the switched hot terminal SH. The relay 210conducts a load current from the AC power source 102 to the lightingload 104 when the relay is closed (i.e., conductive) and does notconduct a load current when the relay is opened (i.e., non-conductive).Alternatively, the controllably conductive device could comprise atriac, a field effect transistor (FET) within a bridge, two FETs coupledin anti-series connection, etc.

The relay 210 is independently controlled by a controller 214. Forexample, the controller 214 may be a microcontroller, but mayalternatively be any suitable processing device, such as a programmablelogic device (PLD), a microprocessor, an application specific integratedcircuit (ASIC), or a field-programmable gate array (FPGA). Thecontroller 214 is coupled to SET and RESET terminals (e.g., SET andRESET coils) of the relay 210 for causing the relay to become conductiveand non-conductive, respectively. A zero-crossing detector 222 iscoupled in series electrical connection between the hot terminal H andthe ground terminal G as well as the switched hot terminal SH and theground terminal G, and the zero-crossing detector determines thezero-crossings of the input AC waveform from the AC power supply 102. Azero-crossing is defined as the time at which the AC supply voltagetransitions from positive to negative polarity, or from negative topositive polarity, at the beginning of each half-cycle. Thezero-crossing information is provided as an input to the controller 214.The controller 214 controls the latching relay 210 such that thelatching relay is rendered conductive near the zero-crossings of theinput AC waveform to minimize electrical stress on the contacts of therelay and is used to detect loss of power.

The electronic switch 110 comprises a power supply 220 to generate a DCsupply voltage V_(CC) (e.g., having an average magnitude ofapproximately three volts). The controller 214 and other low-voltagecircuitry of the electronic switch 110 are powered from the DC supplyvoltage V_(CC). The power supply 220 is operable to generate the DCsupply voltage V_(CC) in response to the leakage current flowing fromthe hot terminal H to the ground terminal G and from the switched hotterminal SH to the ground terminal G.

The controller 214 is coupled to the control actuator 116 such that thecontroller receives inputs in response to actuations of the controlactuator 116 of the electronic switch 110. Accordingly, the controller214 is operable to control the relay 210 to toggle the lighting load 104on and off in response to actuations of the control actuator 116. Thecontroller 214 is further operable to control the visual indicator 118to be illuminated when the lighting load 104 is on and not illuminatedwhen the lighting load is off. According to an alternate embodiment, thevisual indicator 118 may not be present on the electronic switch. Thecontroller 214 is also coupled to a memory 228 for storage ofoperational characteristics of the electronic switch 110. The memory 228may be implemented as an external integrated circuit (IC) or as aninternal circuit of the controller 214.

The electronic switch 110 may further comprise a communication circuit240. The communication circuit 240 may be coupled to a wiredcommunication link (not shown) such the controller 214 can receiveand/or transmit signals or digital messages from other devices in thelighting control system 100. The controller 214 may be operable tocontrol the relay 210 in response to the signals or digital messagesreceived via the wired communication link. Alternatively, thecommunication circuit 240 may comprise a radio-frequency (RF)transceiver (not shown) and an antenna (not shown) for transmitting andreceiving digital messages via RF signals. Examples of RF load controldevices and antennas for wall-mounted load control devices are describedin greater detail in commonly-assigned U.S. Pat. No. 5,982,103, issuedNov. 9, 1999, and U.S. Pat. No. 7,362,285, issued Apr. 22, 2008, bothentitled COMPACT RADIO FREQUENCY TRANSMITTING AND RECEIVING ANTENNA ANDCONTROL DEVICE EMPLOYING SAME, the entire disclosures of which arehereby incorporated by reference.

As previously mentioned, the electronic switch 110 comprises theoccupancy detection circuit 230 that includes an internal detector,e.g., a pyroelectric infrared (PIR) detector. The internal detector ismounted in the electronic switch 110 so as to receive the infraredenergy of the occupant in the space through the lens 120. The controller214 is coupled to the occupancy detection circuit 230, such that thecontroller is operable to process the output of the internal detector todetermine whether an occupancy condition or a vacancy condition ispresently occurring in the space, for example, by comparing the outputof the PIR detector to a predetermined occupancy voltage threshold.Alternatively, the internal detector could comprise an ultrasonicdetector, a microwave detector, or any combination of PIR detectors,ultrasonic detectors, and microwave detectors. The controller 214operates in an “occupied” state or a “vacant” state in response to thedetections of occupancy or vacancy conditions, respectively, in thespace. The controller 214 is operable to control the relay 210 inresponse to the occupancy detection circuit 230.

The electronic switch 110 also comprises an ambient light detector 234(e.g., a photocell) for detecting the level of ambient light around theelectronic switch. The controller 214 is coupled to the ambient lightdetector 234 and regularly measures and filters the ambient light level.When an occupancy condition is first detected, a measured ambient lightlevel L_(M) is compared to a predetermined ambient light level thresholdL_(T). If the measured ambient light level L_(M) is less than thepredetermined ambient light level threshold L_(T) when an occupancycondition is detected by the electronic switch 110, the controller 214controls the latching relay 210 to be conductive. On the other hand, ifthe measured ambient light level L_(M) is greater than the ambient lightlevel threshold L_(T) when an occupancy condition is first detected, thecontroller does not control the latching relay 210 to be conductive.Accordingly, the electronic switch 110 does not turn on the lightingload 104 if the ambient light level in the space is sufficiently high.

FIG. 3 is simplified flowchart of an occupancy detection procedure 400performed by the controller 214 of the electronic switch 110. Theoccupancy detection procedure 400 is performed in response to thecontroller 214 first detecting an occupancy condition (e.g., when thecontroller transitions from operating in a vacant state to an occupiedstate). During the occupancy detection procedure 400, the controller 214of the electronic switch 110 makes a decision as to whether toautomatically turn on the lighting load 104 based on the ambient lightlevel threshold L_(T). Then, the controller 214 subsequently monitorsuser interactions (e.g, actuations of the control actuator 116) todetermine whether the user desires to change the state of the lightingload 104. In the event that the user does desire to change the state ofthe lighting load 104, the electronic switch 110 is operable to respondand change the state of the lighting load accordingly (i.e., allow theuser to manually override the automatic control). Further, based on theuser interactions, the electronic switch 110 can infer whether theambient light level threshold L_(T) requires adjustment to better suitthe needs of the user. In other words, the controller 214 can learn theappropriate value of the ambient light level threshold L_(T) that bestmeets user preferences. If the controller 214 determines that theambient light level threshold L_(T) does require adjustment, then thecontroller subsequently executes ambient light level thresholdadjustment procedures 500 and 600 as will be described further below.Additionally, the electronic switch 110 may be operable to disregardcertain user interactions such that spurious events do not impact theambient light level threshold L_(T).

The occupancy detection procedure 400 begins after occupancy has firstbeen detected at step 401, and the controller 214 sets and beginsdecrementing a user-adjust timer (Timer_(U) _(—) _(ADJ)) at step 402.The user-adjust timer Timer_(U) _(—) _(ADJ) establishes a time window(e.g., approximately 5 seconds) during which the controller 214 monitorsuser interactions after occupancy detection. At step 404, the controller214 compares the measured ambient light level L_(M) to the predeterminedambient light level threshold L_(T). The predetermined ambient lightlevel threshold L_(T) may initially comprise a default value (e.g., 2.5foot-candles) that is stored in the memory 228 of the electronic switch110 at the time of manufacture. Subsequently, the ambient light levelthreshold L_(T) may comprise a value that has already been modifiedduring subsequent executions of ambient light level threshold increaseadjustment procedure 500 and/or ambient light level threshold decreaseadjustment procedure 600.

If the measured ambient light level L_(M) is greater than the ambientlight level threshold L_(T), the controller 214 maintains the relay 210non-conductive (i.e., does not render the latching relay to beconductive) at step 406 such that the lighting load 104 remains off.Then, at step 408, the controller 214 checks to see whether the controlactuator 116 has been actuated to turn on the lighting load 104. If thecontrol actuator has not been actuated to turn on the lighting load 104,the controller then checks whether the user-adjust timer has expired atstep 414. If the user-adjust timer has not expired, the controller 214continues to look for actuations until the user-adjust timer expires atstep 414 at which time the controller 214 exits the occupancy detectionprocedure 400.

If the user does actuate the control actuator 116 to turn on thelighting load 104 at step 408, then the controller 214 executes theambient light level threshold increase adjustment procedure 500 toincrease the value of the predetermined ambient light level thresholdL_(T) before rendering the relay conductive at step 409 (to respond tothe actuation of the control actuator 116) and exiting the occupancydetection procedure 400. In other words, the controller 214 initiallydetermines that there is sufficient ambient light in the space at step404 based on the predetermined ambient light level threshold L_(T), andthen accordingly, does not turn on the lighting load 104 at step 406.However, because the user manually turned on the lighting load 104 atstep 408 (i.e., indicating that there was, in fact, not sufficientambient light in the space), the controller 214 may increase the valueof the ambient light level threshold L_(T) during the ambient lightlevel threshold increase adjustment procedure 500. Thus, the next timethat the occupancy detection procedure 400 is executed, the controller214 may rely upon a slightly increased value of the ambient light levelthreshold L_(T) such that at step 404, the controller may be more likelyto turn on the lighting load 104 during conditions when the measuredambient light level L_(M) is approximately equal to the currentlymeasured ambient light level.

If the measured ambient light level L_(M) is not greater than theambient light level threshold L_(T) at step 404, the controller 214renders the latching relay 210 to be conductive at step 410 (i.e., thelighting load 104 turns on). Then, the controller 214 checks whether thecontrol actuator 116 has been actuated to turn off the lighting load104. If the control actuator 116 has been actuated to turn off thelighting load 104, then the controller 214 executes the ambient lightlevel threshold decrease adjustment procedure 600 to decrease thepredetermined ambient light level threshold L_(T) before rendering therelay non-conductive at step 413 (to respond to the actuation of thecontrol actuator 116) and subsequently exiting the occupancy detectionprocedure 400. In other words, the controller 214 initially determinesthat there is not sufficient ambient light in the space at step 404based on the initial value of the ambient light level threshold L_(T),and then accordingly, turns on the lighting load 104 at step 410.However, because the user manually turned off the lighting load 104 atstep 412 (i.e., indicating that there was, in fact, sufficient ambientlight in the space before the controller 214 rendered the relay 210conductive), the controller 214 decreases the value of the ambient lightlevel threshold L_(T) during ambient light level threshold decreaseadjustment procedure 600. Thus, the next time that the occupancydetection procedure 400 is executed, the controller 214 will use anambient light level threshold L_(T) having a slightly decreased valuesuch that at step 404, the controller will be less likely to turn on thelighting load 104 during conditions when the measured ambient lightlevel L_(M) is approximately equal to the currently measured ambientlight level.

If the controller 214 does not receive any actuations of the controlactuator 116 at step 412, the controller then checks whether theuser-adjust timer has expired at step 416. If the user-adjust timer hasnot expired, the controller 214 continues to look for actuations untilthe user-adjust timer expires upon which the controller 214 exits theoccupancy detection procedure 400.

FIG. 4A is a simplified flowchart of the ambient light level thresholdincrease adjustment procedure 500. At step 502, the controller 214calculates an ambient light level threshold delta by subtracting theambient light level threshold L_(T) from the measured ambient lightlevel L_(M) as shown in the following equation:

Delta=|L _(M) −L _(T)|.  (Equation 1)

At step 504, an adjusted ambient light level threshold L_(T) _(—) _(ADJ)is calculated using the following equation:

L _(T) _(—) _(ADJ) =L _(M)+(Delta*F _(S) _(—) _(INC))  (Equation 2)

where F_(S) _(—) _(INC) is a scaling increase factor (e.g.,approximately ¼ or ½). Then, at step 506, the adjusted ambient lightlevel threshold L_(T) _(—) _(ADJ) is compared to a maximum ambient lightlevel L_(MAX) (e.g., approximately 40 foot-candles). If the adjustedambient light level threshold L_(T) _(—) _(ADJ) exceeds the maximumambient light level L_(MAX), then at step 508, the value of the adjustedambient light level threshold L_(T) _(—) _(ADJ) is set to the maximumambient light level.

Then, at step 510 the adjusted ambient light level threshold L_(T) _(—)_(ADJ) is digitally filtered to determine a new value of the ambientlight level threshold L_(T), for example, using a digital filtercharacterized by the following equation:

L _(T) =[L _(T) _(—) _(ADJ) +L _(T) _(—) ₁+(L _(T) _(—)₂*2)]/4  (Equation 3)

where L_(T) _(—) ₁ and L_(T) _(—) ₂ are historical values of the ambientlight level threshold. For example, L_(T) _(—) ₁ is the previous valueof the ambient light level threshold L_(T) and L_(T) _(—) ₂ is the valueof the ambient light level threshold used before the previous valueL_(T) _(—) ₁. Thus, the controller 214 digitally filters the adjustedambient light level threshold L_(T) _(—) _(ADJ) using historical ambientlight thresholds to avoid grossly adjusting the ambient light levelthreshold L_(T). Finally, the controller exits the ambient light levelthreshold increase procedure 500.

FIG. 4B is a simplified flowchart of the ambient light level thresholddecrease adjustment procedure 600. At step 602, the controller 214calculates the ambient light level threshold delta using Equation 1 asdescribed above. Then at step 604, the adjusted value of the ambientlight level threshold L_(T) _(—) _(ADJ) is calculated using thefollowing equation:

L _(T) _(—) _(ADJ) =L _(M)−(Delta*F _(S) _(—) _(DEC))  (Equation 4)

where F_(S) _(—) _(DEC) is a scaling decrease factor (e.g.,approximately ¼ or ½). Then at step 606, the adjusted value of theambient light level threshold L_(T) _(—) _(ADJ) is compared to a minimumambient light level L_(MIN) (e.g., approximately 1 foot-candle). If theadjusted value of the ambient light level threshold L_(T) _(—) _(ADJ) isless than the minimum ambient light level L_(MIN), then at step 608, theadjusted ambient light level threshold is set to the minimum ambientlight level. Next at step 610, the adjusted ambient light levelthreshold L_(T) _(—) _(ADJ) is digitally filtered to determine a newvalue of the ambient light level threshold L_(T) using Equation 3described above before the controller exits the ambient light levelthreshold decrease procedure 600.

Additionally, when the user does not adjust or override the automaticresponse of the electronic switch 110 during the occupancy detectionprocedure 400, the controller 214 may be operable to capture that eventand apply it to a digital filter. In other words, if the automaticresponse of the electronic switch based on the present ambient lightlevel threshold L_(T), did not result in any subsequent user actuations,then it may be valuable to factor that event into the formulation of theambient light level threshold. More particularly, if the user-adjusttimer expires at steps 414 or 416 (i.e., actuator is not accessed by auser during the time window) during the occupancy detection procedure400, the controller 214 is further operable to update a new value of theambient light level threshold L_(T), for example, using a digital filtercharacterized by the following equation:

L _(T) =[L _(T) +L _(T) _(—) ₁+(L _(T) _(—) ₂*2)]/4  (Equation 5)

to appropriately factor the current ambient light level threshold L_(T)into the digital filter. Equation 5 is essentially the same as equation4, however, equation 5 relies upon the current ambient light levelthreshold L_(T) rather than the adjusted ambient light level thresholdL_(T) _(—) _(ADJ).

In short, the controller 214 of the electronic switch 110 digitallyfilters historical data of user actuations to appropriately adjust theambient light level threshold L_(T) based on usage representative oftypical everyday use of the electronic switch. Alternatively, thecontroller 214 may process the historical data of user actuations in adifferent fashion than described above, for example, by using a box caraverage technique or a box car median technique to update theappropriate ambient light level threshold.

While the present invention has been described with reference to theelectronic switch 110 controlling the power delivered to a connectedlighting load, the concepts of the present invention could be used inany type of control device of a load control system, such as, forexample, a dimmer switch for adjusting the intensity of a lighting load(such as an incandescent lamp, a magnetic low-voltage lighting load, anelectronic low-voltage lighting load, and a screw-in compact fluorescentlamp), a remote control, a keypad device, a visual display device, acontrollable plug-in module adapted to be plugged into an electricalreceptacle, a controllable screw-in module adapted to be screwed intothe electrical socket (e.g., an Edison socket) of a lamp, an electronicdimming ballast for a fluorescent load, a driver for a light-emittingdiode (LED) light source, a motor speed control device, a motorizedwindow treatment, a temperature control device, an audio/visual controldevice, or a dimmer circuit for other types of lighting loads, such as,magnetic low-voltage lighting loads, electronic low-voltage lightingloads, and screw-in compact fluorescent lamps.

Additionally, the concepts of the present invention could be used inload control systems where the ambient light detector and/or occupancydetector and/or control actuator, etc are located remotely from thecontroller and are operable to communicate over a wired or wirelesscommunication link. Examples of such load control systems are describedin greater detail in commonly-assigned U.S. patent application Ser. No.12/845,016, filed Jul. 28, 2010, entitled LOAD CONTROL SYSTEM HAVING ANENERGY SAVINGS MODE, the entire disclosure of which is herebyincorporated by reference.

Although the present invention has been described in relation toparticular embodiments thereof, many other variations and modificationsand other uses will become apparent to those skilled in the art. It ispreferred, therefore, that the present invention be limited not by thespecific disclosure herein, but only by the appended claims.

1. A method for controlling the power delivered from an AC power sourceto an electrical load comprising: detecting an occupancy condition;comparing a measured ambient light level to a first value of an ambientlight level threshold; controlling the power delivered to the electricalload in response to the steps of detecting the occupancy condition andcomparing the measured ambient light level; receiving an actuation tochange a state of the electrical load after the step of controlling thepower; and adjusting the ambient light level threshold to a second valuein response to the step of receiving an actuation.
 2. The method ofclaim 1, further comprising: determining that the measured ambient lightlevel exceeds the first value of the ambient light level threshold. 3.The method of claim 2, wherein the step of controlling the power furthercomprises: maintaining the electrical load in the off state.
 4. Themethod of claim 3, further comprising: turning the electrical load on inresponse to the step of receiving the actuation.
 5. The method of claim4, wherein the step of adjusting the ambient light level thresholdfurther comprises: increasing the ambient light level threshold from thefirst value to the second value.
 6. The method of claim 1, furthercomprising: determining that the measured ambient light level does notexceed the first value of the ambient light level threshold.
 7. Themethod of claim 6, wherein the step of controlling the power furthercomprises: automatically turning the electrical load on.
 8. The methodof claim 7, further comprising: turning the electrical load off inresponse to the step of receiving the actuation.
 9. The method of claim8 wherein the step of adjusting the ambient light level thresholdfurther comprises: decreasing the ambient light level threshold from thefirst value to the second value.
 10. The method of claim 1 furthercomprising: detecting a second occupancy condition; and comparing themeasured ambient light level to the second value of the ambient lightlevel threshold.
 11. The method of claim 1, wherein the step ofadjusting the ambient light level threshold further comprises:calculating a difference between the measured ambient light level andthe first value of the ambient light level threshold; and using thecalculated difference to adjust the ambient light level threshold fromthe first value to the second value.
 12. The method of claim 11, furthercomprising: multiplying the calculated difference by a scaling factor;and adjusting a value of the measured ambient light level by the productof the calculated difference and the scaling factor to generate anadjusted value of the ambient light level threshold; wherein theadjusted value of the ambient light level threshold is used to adjustthe ambient light level threshold from the first value to the secondvalue.
 13. The method of claim 12, wherein the adjusted value of theambient light level threshold is the second value of the ambient lightlevel threshold.
 14. The method of claim 12, further comprising:digitally filtering the adjusted value of the ambient light levelthreshold to generate the second value of the ambient light levelthreshold.
 15. A load control device adapted to be coupled between an ACpower source and an electrical load for controlling the power deliveredto the load, the load control device comprising: a controllablyconductive device adapted to be coupled between the source and the loadfor controlling the power delivered to the load; a controlleroperatively coupled to the controllably conductive device for renderingthe controllably conductive device conductive and non-conductive; anactuator operatively coupled to the controller such that the controlleris operable to render the controllably conductive device conductive andnon-conductive in response to actuations of the actuator; an occupancydetection circuit for detecting the presence or absence of an occupant,the occupancy detection circuit operatively coupled to the controller;and an ambient light detector for measuring the ambient light level, theambient light detector operatively coupled to the controller, thecontroller operable to render the controllably conductive deviceconductive and non-conductive in response to the occupancy detectioncircuit and the ambient light detector; wherein the controller isoperable to automatically adjust an ambient light level threshold inresponse to detecting an actuation of the actuator that occurs afterdetecting the presence of an occupant.
 16. The load control device ofclaim 15, wherein the controller is operable to render the controllablyconductive device conductive in response to detecting the presence of anoccupant and determining that a measured ambient light level does notexceed a first value of the ambient light level threshold.
 17. The loadcontrol device of claim 16, wherein in response to receiving anactuation to render the controllably conductive device non-conductive,the controller is operable to increase the ambient light level thresholdto a second value greater than the first value.
 18. The load controldevice of claim 15, wherein the controller is operable to maintain thecontrollably conductive device non-conductive in response to detectingthe presence of an occupant and determining that the measured ambientlight level does exceed a first value of the ambient light levelthreshold.
 19. The load control device of claim 18, wherein in responseto receiving an actuation to render the controllably conductive deviceconductive, the controller is operable to decrease the ambient lightlevel threshold to a second value less than the first value.
 20. A loadcontrol system for controlling the power delivered to a load, the loadcontrol system comprising: at least one actuator operable to receiveactuations to turn the load on or off in response to the actuations; anoccupancy detector for detecting the presence or absence of an occupant;an ambient light detector for measuring the ambient light level; acontroller operable to respond to actuations of the actuator, thedetected presence or absence of the occupant, and the measured ambientlight level; a load control device adapted to be coupled between an ACpower source and the load for controlling the power delivered to theload in response to the controller; wherein the controller is operableto automatically adjust an ambient light level threshold in response todetecting an actuation of the actuator that occurs after detecting thepresence of an occupant.
 21. The load control system of claim 20,wherein the controller is operable to control the load control device todeliver power to the load in response to detecting the presence of anoccupant and determining that a measured ambient light level does notexceed a first value of the ambient light level threshold.
 22. The loadcontrol system of claim 21, wherein in response to receiving anactuation to turn off the load, the controller is operable to increasethe ambient light level threshold to a second value greater than thefirst value.
 23. The load control system of claim 20, wherein thecontroller is operable to control the load control device to maintainthe load off in response to detecting the presence of an occupant anddetermining that the measured ambient light level does exceed a firstvalue of the ambient light level threshold.
 24. The load control systemof claim 23, wherein in response to receiving an actuation to turn onthe load, the controller is operable to decrease the ambient light levelthreshold to a second value less than the first value.